package lab02.test21;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

public class CharCounter {
    public static int counter(String s, char c) {
        int i = 0;
        int count = 0;
        for (i = 0; i < s.length(); i++) {
            if(s.charAt(i)==c){
                count++;
            }
        }
        return count;
   }
    public static void main(String[] args) {

        System.out.println(new CharCounter().counter("lovelovellll",'l'));
    }
}
